package com.doctcloud.hisinfo.histable.domain.comm;

import com.baomidou.mybatisplus.annotation.TableName;
import com.doctcloud.common.core.annotation.Excel;
import com.doctcloud.common.core.annotation.TableDesc;
import com.doctcloud.common.core.web.domain.BaseCharsetEntity;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

import static com.doctcloud.common.core.utils.StringUtils.trim;
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(of = {"materialProperty"})
@ToString
@Data
@TableDesc("药品材质分类字典")
public class DrugMaterialPropertyDictDo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Excel(name = "序号")
    private Integer serialNo;
    @Excel(name = "材质代码")
    @NotBlank(message = "材质代码不得为空")
    private String  code;
    @Excel(name = "材质名称")
    @NotBlank(message = "材质名称不得为空")
    private String  materialProperty;
    @Excel(name = "病首费用分类")
    private String  mrFeeClassCode;
    @Excel(name = "会计科目分类")
    private String subjectClass;
    @Excel(name = "核算项目分类")
    private String reckClass;
    @Excel(name = "门诊收据分类")
    private String outpRcptClass;
    @Excel(name = "住院收据分类")
    private String inpRcptClass;

    @Data
    public static class primaryKey {
        private final String materialProperty;
        public primaryKey(String materialProperty) {
            this.materialProperty = materialProperty;
        }
    }

    public void setMaterialProperty(String materialProperty) {
        this.materialProperty = trim(materialProperty);
    }
}
